package com.suxin.plugin.intergration.manager.repository.filter;

import java.io.File;
import java.io.FileFilter;

/**
 * @author Tang
 * @classname ExtensionFileFilter
 * @description [  ]
 * @date 2022/7/3 20:55
 */
public abstract class ExtensionFileFilter implements FileFilter {

    private String extension;

    public ExtensionFileFilter(String extension) {
        this.extension = extension;
    }

    @Override
    public boolean accept(File file) {
        return file.getName().toUpperCase().endsWith(extension.toUpperCase());
    }
}